package cn.zch.soft.util.thread;
/***
 * @class TestLock
 * @description TODO
 * @author zch
 * @date 2019/8/27
 * @version V0.0.1.201908271831.01
 * @modfiyDate 201908271831
 * @createDate 201908271831
 * @package com.xb.utils.threadutils
 */
public class SynchronizedLockMode {
	private static int increment = 0;
	private Object object = new Object();
	public synchronized void lockMethod() {
		increment++;
		System.out.println("lockMethod");
	}
	public synchronized static void lockStaticMethod() {
		increment++;
		System.out.println("lockStaticMethod");
	}
	public void lockBlock() {
		synchronized (object) {
			increment++;
			System.out.println("lockBlock");
		}
	}
}
